/* eslint-disable prefer-const */
/* eslint-disable guard-for-in */

const apis = {
  login: '/auth/login',
  info: '/system/user/info',
  downloadUrl: '/system/common/download',
  loginOut: '/auth/logout',
  userList: '/system/user/list',
  user_update: '/system/user/update',
  user_save: '/system/user/save',
  user_remove: '/system/user/remove',
  role: '/system/role',
  roleStatus: '/system/role/status',
  permission_user: '/system/menu/user',
  permission_all: '/system/menu/all',
  permission_list: '/system/menu/list',
  permission_role: '/system/menu/role/',
  permission_update: '/system/menu/update',
  permission_save: '/system/menu/save',
  permission_remove: '/system/menu/remove/',
  dept_role: '/system/dept//role/',
  dept_list: '/system/dept/list',
  dept_list_enable: '/system/dept/list/enable',
  dept_update: '/system/dept/update',
  dept_save: '/system/dept/save',
  dept_remove: '/system/dept/remove/',
  role_List: '/system/role/list',
  role_update: '/system/role/update',
  role_save: '/system/role/save',
  role_remove: '/system/role/remove',
  role_all: '/system/role/all',
  role_authDataScope: '/system/role/authDataScope',
  dictType_list: '/system/dict/type/list',
  dictType_update: '/system/dict/type/update',
  dictType_save: '/system/dict/type/save',
  dictType_remove: '/system/dict/type/remove',
  dictData_list: '/system/dict/data/list',
  dictData_type: '/system/dict/data/type',
  dictData_update: '/system/dict/data/update',
  dictData_save: '/system/dict/data/save',
  dictData_remove: '/system/dict/data/remove',
  dist_List: '/system/districts/list',
  dist_update: '/system/districts/update',
  dist_save: '/system/districts/save',
  dist_remove: '/system/districts/remove',
  logininfor_List: '/system/logininfor/list',
  logininfor_clean: '/system/logininfor/clean',
  logininfor_remove: '/system/logininfor/remove',
  operLog_List: '/system/operLog/list',
  operLog_export: '/system/operLog/export',
  operLog_clean: '/system/operLog/clean',
  operLog_remove: '/system/operLog/remove',
  config_List: '/system/config/list',
  config_update: '/system/config/update',
  config_save: '/system/config/save',
  config_remove: '/system/config/remove',
  oss_List: '/system/oss/list',
  oss_update: '/system/oss/update',
  oss_save: '/system/oss/save',
  oss_remove: '/system/oss/remove',
  resetPassword: '/system/user/resetPwd',
  userStatus: '/system/user/status',
  userRemove: '/system/user/remove',
  SysDictList: '/dss-mgt/appConfig/getSysDictList', // 公共下拉
  deviceRemove: '/dss-mgt/device/remove', // 设备删除
  areaManger: '/dss-mgt/manage/list', // 区域管理
  areaAdd: '/dss-mgt/manage/save', // 新增区域
  areaRemove: '/dss-mgt/manage/remove', // 删除区域
  areaUpdate: '/dss-mgt/manage/update', // 更新区域
  areaQueryData: '/dss-mgt/manage/getInfoById', // 获取区域回显数据
  areaAllList: '/dss-mgt/appConfig/getRegionalList', // 区域下拉
  waringList: '/dss-mgt/configuration/selectAlarmTriggerConfigurationList', // 告警触发设置列表
  waringQueryData: '/dss-mgt/configuration/selectAlarmTriggerConfigurationById', // 告警回显
  waringUpdate: '/dss-mgt/configuration/update', // 告警保存
  waringSave: '/dss-mgt/configuration/addMoreDevices', // 告警新增
  deviceAllList: '/dss-mgt/configuration/selectIntelligentDeviceList', // 获取所有设备的下拉列表
  deviceQuery: '/dss-mgt/device/getInfoById', // 设备回显
  deviceUpdate: '/dss-mgt/device/update', // 设备修改保存
  alarmRecordList: '/dss-daq/alarmrecord/alarmRecordList', // 设备告警记录-列表
  deviceMonitorList: '/dss-daq/device_monitoring/selectList', // 设备监控LIST
  deviceMonitorList1: '/dss-daq/device_monitoring/selectSmokeDetectorRecordById', // 查询烟雾传感器历史记录
  deviceMonitorList2: '/dss-daq/device_monitoring/selectAmeterRecordById', // 查询电表传感器历史记录
  chart1: '/dss-daq/chart_statistics/selectElectricCurrent', // 获取电流图标
  chart2: '/dss-daq/chart_statistics/selectPositiveActivePower', // 查询正向有电功电度
  chart3: '/dss-daq/chart_statistics/selectVoltage', // 查询电压
  chart4: '/dss-daq/chart_statistics/selectSmokeDetector', // 查询烟雾报警器
  deviceSave: '/dss-mgt/device/save', // 智能设备新增
  waringRemove: '/dss-mgt/configuration/removeAlarmTriggerConfiguration', // 告警设置删除
  selectPower: '/dss-daq/chart_statistics/selectPower', // 查询正负总功率
  reservateOrder_list: '/operation/reservateOrder/list', // 查看排班列表
  reservateOrder_save: '/operation/reservateOrder/save', // 保存排班
  tickeOrder_list: '/operation/tickeOrder/list', // 查询票务
  tickeOrder_save: '/operation/tickeOrder/save', // 保存票务
  getReservateOrderById: '/operation/reservateOrder/getReservateOrderById', // 查询预约支付信息
  tic_ReservateOrderById: '/operation/tickeOrder/getTickeOrderById', // 查询票务支付信息
  checkInByTickNo: '/operation/checkin/checkInByTickNo', // 验票
  queryOrderManagementList: '/operation/ordermanagement/queryOrderManagementList', // 查询订单管理列表
  updateRemark: '/operation/ordermanagement/updateRemark', // 订单备注
  orderDetails: '/operation/ordermanagement/orderDetails', // 查询订单详情
  closeOrder: '/operation/ordermanagement/closeOrder', // 关闭订单
  checkInByTickNoInfo: '/operation/checkinrecord/checkInByTickNo', // 验票记录查询
  SaveReservate: '/operation/goodsAndServices/SaveReservate', // 保存预约信息
  selectVenueTicketSet: '/operation/goodsAndServices/selectVenueTicketSet', // 查询票务信息
  insertVenueTicketSet: '/operation/goodsAndServices/insertVenueTicketSet', // 新增票务信息
  deleteVenueTicketSet: '/operation/goodsAndServices/deleteVenueTicketSet', // 新增票务信息
  modifyStrtus: '/operation/goodsAndServices/modifyStrtus', // 修改票务状态
  updateVenueTicketSet: '/operation/goodsAndServices/updateVenueTicketSet', // 修改票务信息
  selectVenueTicketSetById: '/operation/goodsAndServices/selectVenueTicketSetById', // 修改票务信息
  queryCustomerList: '/operation/customermanager/queryCustomerList', // 查询客户列表
  queryCustomerDetailInfo: '/operation/customermanager/queryCustomerDetailInfo', // 查询客户详情
  addCustomer: '/operation/customermanager/addCustomer', // 新增客户
  updateCustomer: '/operation/customermanager/updateCustomer', // 修改客户
  venuevManagementList: '/operation/venuevManagement/list', // 场馆管理-查询
  customermanagerExport: '/operation/customermanager/export', // 客户管理-导出
  venuevManagementSelectVenuevManagementById: '/operation/venuevManagement/selectVenuevManagementById', // 场馆回显
  venuevManagementInsertVenuevManagement: '/operation/venuevManagement/insertVenuevManagement', // 场馆新增
  venuevManagementUpdateVenuevManagement: '/operation/venuevManagement/updateVenuevManagement', // 场馆 修改
  ImageUpload: 'http://101.37.205.208:8077/Assets/File/ImageUpload', // 图片上传
  deviceList: '/dss-mgt/device/getAll', // 设备列表
  getWeather: '/dss-mgt/weather/getWeather', // 获取武汉天气
}
/* function changeStr(str) {
    const arr = str.split('')
    const arr1 = arr.filter((item, index) => index % 2 === 0)
    const arr2 = arr.filter((item, index) => index % 2 === 1)
    let str1 = ''
    for (let i in arr1.length > arr2.length ? arr1 : arr2) {
      if (arr2[i] !== undefined) {
        str1 += arr2[i]
      }
      if (arr1[i] !== undefined) {
        str1 += arr1[i]
      }
    }
    return str1
  } */
  if (process.env.NODE_ENV === 'development') {
    Object.keys(apis).forEach((key) => {
      apis[key] = `${apis[key]}`
    })
  } else {
    Object.keys(apis).forEach((key) => {
      apis[key] = `/api${apis[key]}`
      // apis[key] = `/api${apis[key]}`
    })
  }
  export default apis
